package com.grape.dp.adapter.logdemo.impl;


import com.grape.dp.adapter.logdemo.LogWriteFileService;
import com.grape.dp.adapter.logdemo.entity.LogBean;

import java.util.ArrayList;
import java.util.List;

/**
 * 描述:LogWriteFileServiceImpl
 * @author: myx
 * @date: 2019/7/29 0029
 * Copyright © 2019-grape. All rights reserved.
 */
public class LogWriteFileServiceImpl implements LogWriteFileService {
    public void logWriteFile() {
        System.out.println(">>>将日志写入到本地文件中..");
    }

    @Override
    public List<LogBean> readLogFile() {
        LogBean log1 = new LogBean();
        log1.setLogId("0001");
        log1.setLogText("Tomcat启动成功..");

        LogBean log2 = new LogBean();
        log2.setLogId("0002");
        log2.setLogText("Jetty启动成功..");
        List<LogBean> listArrayList = new ArrayList<>();
        listArrayList.add(log1);
        listArrayList.add(log2);
        return listArrayList;

    }
}
